package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

public enum BlogClass {
	PLAY("01", "玩"), STUDY("02", "学"), MEDICAL("03", "医"), USE("04", "用"), FOOD(
			"05", "食"), OTHER("06", "其他");
	private String value;
	private String label;

	private static Map<String, String> cache;

	static {
		cache = new HashMap<String, String>();
		cache.put(PLAY.getValue(), PLAY.getLabel());
		cache.put(STUDY.getValue(), STUDY.getLabel());
		cache.put(MEDICAL.getValue(), MEDICAL.getLabel());
		cache.put(USE.getValue(), USE.getLabel());
		cache.put(FOOD.getValue(), FOOD.getLabel());
		cache.put(OTHER.getValue(), OTHER.getLabel());
	}

	private BlogClass(String value, String label) {
		this.value = value;
		this.label = label;
	}

	public String getValue() {
		return value;
	}

	public String getLabel() {
		return label;
	}

	public static String getLabelByValue(String value) {
		return cache.get(value);
	}
}
